home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / ZIP19.ARJ / VMS_ZIP.RNH < prev    next >
Text File  |  1992-08-20  |  18KB  |  416 lines

  1. .!
  2. .!  File:    ZIP.RNH
  3. .!
  4. .!  Author:    Hunter Goatley
  5. .!
  6. .!  Date:    October 22, 1991
  7. .!
  8. .!  Description:
  9. .!
  10. .!    RUNOFF source file for portable ZIP on-line help for VMS.
  11. .!    Adapted from ZIP.DOC, distributed with ZIP.
  12. .!
  13. .!    To build:    $ RUNOFF ZIP.RNH
  14. .!            $ LIBR/HELP/INSERT libr ZIP
  15. .!
  16. .!  Modification history:
  17. .!
  18. .!    Hunter Goatley        22-OCT-1991 20:45
  19. .!        Genesis.
  20. .!    Jean-loup Gailly    25 March 92
  21. .!        Adaptation to zip 1.6.
  22. .!    Igor Mandrichenko    9-JUN-1992
  23. .!        Added explanation of -V option.
  24. .!    Jean-loup Gailly    14 June 92
  25. .!        Adaptation to zip 1.8.
  26. .!    Jean-loup Gailly    20 Aug 92
  27. .!        Adaptation to zip 1.9.
  28. .!
  29. .noflags
  30. .lm4 .rm72
  31. .indent -4
  32. 1 ZIP
  33. .br
  34. Zip is a compression and file packaging utility for Unix, MSDOS, OS/2, and
  35. VMS.  It is analogous to a combination of tar and compress and is
  36. compatible with PKZIP (Phil Katz ZIP) for MSDOS systems.
  37. .sk
  38. There is a companion to Zip called UnZip (of course).  Zip and UnZip can
  39. work with files produced by PKZIP under MSDOS, and PKZIP and PKUNZIP can
  40. work with files produced by Zip.
  41. .sk
  42. Zip 1.9 is compatible with PKZIP 1.93a.
  43. Note that pkunzip 1.10 cannot extract files produced by pkzip 1.93a
  44. or zip 1.9. You must use pkzip 1.93a or unzip 5.0 to extract them.
  45. .sk
  46. For a brief help on Zip and Unzip, run each without specifying any
  47. parameters on the command line.
  48. .sk
  49. Zip puts one or more compressed files into a single "zip file" along with
  50. information about the files, including the name, path if requested, date
  51. and time last modified, protection, and check information to verify the
  52. fidelity of each entry.  Zip can pack an entire directory structure in a
  53. zip file with a single command.  Compression ratios of 2:1 to 3:1 are
  54. common for text files.  Zip has has one compression method (deflation) and
  55. can also store files without compression. It automatically chooses the better
  56. of the two for each file to be compressed.
  57. .sk
  58. Zip is useful for packaging a set of files to send to someone or for
  59. distribution; for archiving or backing up files; and for saving disk space
  60. by temporarily compressing unused files or directories.
  61. .sk
  62. Format:
  63. .sk;.lm+1;.literal
  64. ZIP [-options] [-b path] [-n suffixes] [-t mmddyy] zipfile file(s) [-x list]
  65. .end literal;.lm-1
  66. .!------------------------------------------------------------------------------
  67. .indent -4
  68. 2 Options
  69. .br
  70. The default action of Zip is to add or replace zipfile entries from list, which
  71. can include the special name -@ to read names from SYS$INPUT.  The following
  72. list of options was taken from the on-line help generated when Zip is run
  73. without any command-line parameters:
  74. .sk
  75. .literal
  76.   -f   freshen: only changed files
  77.   -d   delete entries in zipfile
  78.   -k   simulate PKZIP made zipfile
  79.   -h   show this help
  80.   -r   recurse into directories
  81.   -q   quiet operation
  82.   -c   add one-line comments
  83.   -b   use "path" for temp files
  84.   -o   make zipfile as old as latest entry
  85.   -w   append the VMS version number to name stored in zip file
  86.   -x   exclude the names that follow from those operated on
  87.   -u   update: only changed or new files
  88.   -m   move into zipfile (delete files)
  89.   -g   allow growing existing zipfile
  90.   -l   translate end-of-lines
  91.   -j   junk (don't record) directory names
  92.   -0   store only
  93.   -1   compress faster
  94.   -9   compress better
  95.   -n   don't compress theses suffixes
  96.   -z   add zipfile comment
  97.   -t   only do files after "mmddyy"
  98.   -L   show software license
  99.   -V   save VMS file attributes
  100. .end literal
  101. .!------------------------------------------------------------------------------
  102. .indent -4
  103. 2 How_To_Use_Zip
  104. .br
  105. The simplest use of Zip is as follows:
  106. .sk;.indent 10;$ zip stuff *
  107. .sk
  108. This will create the file "STUFF.ZIP" (assuming it does not exist) and put
  109. all the files in the current directory in STUFF.ZIP in a compressed form.
  110. The .ZIP suffix is added automatically, unless that file name given
  111. contains a dot already.  This allows specifying suffixes other than ".ZIP".
  112. .sk
  113. To zip up an entire directory, the command:
  114. .sk;.indent 10
  115. $ zip -r foo *.*
  116. .sk
  117. will create the file "FOO.ZIP" containing all the files and directories in
  118. the in the current directory.  The "r" option means recurse through the
  119. directory structure.
  120. .sk
  121. You may want to make a zip file that contains the files in [.FOO], but not
  122. record the directory name, FOO.  You can use the -j (junk path) option to
  123. leave off the path:
  124. .sk;.indent 10
  125. $ zip -j foo [.foo]*.*
  126. .sk
  127. You might be zipping to save disk space, in which case you could:
  128. .sk;.indent 10
  129. $ zip -rm foo *.txt
  130. .sk
  131. where the "m" option means "move".  This will delete all files matching
  132. *.txt after making FOO.ZIP.  No deletions will be done until the zip has
  133. completed with no errors.  This option is obviously more dangerous and
  134. should be used with care.
  135. .sk
  136. If the zip file already exists, these commands will replace existing or add
  137. new entries to the zip file.  For example, if you were really short on disk
  138. space, you might not have enough room simultaneously to hold the directory
  139. [.FOO] and the compressed FOO.ZIP.  In this case, you could do it in steps.
  140. If [.FOO] contained the subdirectories [.TOM], [.DICK], and [.HARRY], then
  141. you could:
  142. .sk;
  143. .indent 10;$ zip -rm foo [.foo.tom]
  144. .indent 10;$ zip -rm foo [.foo.dick]
  145. .indent 10;$ zip -rm foo [.foo.harry]
  146. .sk
  147. where the first command would create FOO.ZIP, and the next two would add to
  148. it.  At the completion of each zip command, the files in the directory just
  149. zipped would be deleted, making room in which the next Zip command could
  150. work.
  151. .!------------------------------------------------------------------------------
  152. .indent -4
  153. 2 Modifying_Existing_Zip_Files
  154. .br
  155. When given the name of an existing zip file with the above commands, Zip
  156. will replace identically named entries in the Zip file or add entries for
  157. new names.  For example, if FOO.ZIP exists and contains foo/file1 and
  158. foo/file2, and the directory [.FOO] contains the files foo/file1 and
  159. foo/file3, then:
  160. .sk;.indent 10
  161. $ zip -r foo foo
  162. .sk
  163. will replace foo/file1 in foo.zip and add foo/file3 to FOO.ZIP.  After
  164. this, FOO.ZIP contains foo/file1, foo/file2, and foo/file3, with foo/file2
  165. unchanged from before.
  166. .sk
  167. When changing an existing zip file, Zip will write a temporary file with
  168. the new contents, and only replace the old one when the zip has completed
  169. with no errors. You can use
  170. the -b option to specify a different path (usually a different dev- ice) to
  171. put the temporary files in.  For example:
  172. .sk;.indent 10
  173. $ zip -b scratch$:[tmp] stuff *
  174. .sk
  175. will put the temporary zip file and the temporary compression files in the
  176. directory "SCRATCH$:[TMP]", copying over STUFF.ZIP in the current directory
  177. when done.
  178. .sk
  179. If you are only adding entries to a zip file, not replacing, and the -g
  180. option is given, then Zip grows (appends to) the file instead of copying
  181. it.  The danger of this is that if the operation fails, the original zip
  182. file is corrupted and lost.
  183. .sk
  184. There are two other ways to change or add entries in a zip file that are
  185. restrictions of simple addition or replacement.  The first is -u (update)
  186. which will add new entries to the zip file as before but will replace
  187. existing entries only if the modified date of the file is more recent than
  188. the date recorded for that name in the zip file.  For example:
  189. .sk;.indent 10
  190. $ zip -u stuff *
  191. .sk
  192. will add any new files in the current directory, and update any changed
  193. files in the zip file STUFF.ZIP.  Note that Zip will not try to pack
  194. STUFF.ZIP into itself when you do this. Zip will always exclude the zip
  195. file from the files on which to be operated.
  196. .sk
  197. The second restriction is -f (freshen) which, like update, will only
  198. replace entries with newer files; unlike update, will not add files that
  199. are not already in the zip file. For this option, you may want to simply
  200. freshen all of the files that are in the specified zip file.  To do this
  201. you would simply:
  202. .sk;.indent 10
  203. $ zip -f foo
  204. .sk
  205. Note that the -f option with no arguments freshens all the entries in the
  206. zip file.  The same is true of -u, and hence "zip -u foo" and "zip -f foo"
  207. both do the same thing.
  208. .sk
  209. This command should be run from the same directory from which the original
  210. zip command was run, since paths stored in zip files are always relative.
  211. .sk
  212. Another restriction that can be used with adding, updating, or freshening
  213. is -t (time), which will not operate on files modified earlier than the
  214. specified date.  For example:
  215. .sk;.indent 10
  216. $ zip -rt 120791 infamy [.FOO]*.*
  217. .sk
  218. will add all the files in [.FOO] and its subdirectories that were last
  219. modified on December 7, 1991, or later to the zip file INFAMY.ZIP.
  220. .sk
  221. Also, files can be explicitly excluded using the -x option:
  222. .sk;.indent 10
  223. $ zip -r foo [.FOO] -x *.obj
  224. .sk
  225. which will zip up the contents of [.FOO] into FOO.ZIP but exclude all the
  226. files that end in ".OBJ".
  227. .sk
  228. The last operation is -d (delete) which will remove entries from a zip
  229. file.  An example might be:
  230. .sk;.indent 10
  231. $ zip -d foo foo/harry/*.* *.obj
  232. .sk
  233. which will remove all of the files that start with "foo/harry/" and all of
  234. the files that end with ".OBJ" (in any path).
  235. .sk
  236. Under MSDOS, -d is case sensitive when it matches names in the zip file.
  237. This allows deleting names that were zipped on other systems, but requires
  238. that the names be entered in upper case if they were zipped on an MSDOS
  239. system, so that the names can be found in the zip file and deleted.
  240. .!------------------------------------------------------------------------------
  241. .indent -4
  242. 2 More_Options
  243. .br
  244. As mentioned before, Zip will use the best of two methods: deflate or store.
  245. The option -0 will force Zip to use store on all files. For example:
  246. .sk;.indent 10
  247. zip -r0 foo foo
  248. .sk
  249. will zip up the directory foo into foo.zip using only store.
  250. .sk
  251. The speed of deflation can also be controlled with options -1 (fastest
  252. method but less compression) to -9 (best compression but slower). The
  253. default value is -5. For example:
  254. .sk;.indent 10
  255. zip -r8 foo foo
  256. .sk
  257. In nearly all cases, a file that is already compressed cannot be compressed
  258. further by Zip, or if it can, the effect is minimal.  The -n option
  259. prevents Zip from trying to compress files that have the
  260. given suffixes.  Such files are simply stored (0%
  261. compression) in the
  262. output zip file, so that Zip doesn't waste its time trying to compress
  263. them. The suffixes are separated by
  264. either colons or semicolons.  For example, in DCL:
  265. .sk
  266. .indent 10;$ zip -rn ".Z:.zip:.tiff:.gif:.snd" foo [.FOO]*.*
  267. .sk
  268. will put everything in [.FOO] into FOO.ZIP, but will store any files that end
  269. in .Z, .ZIP, .TIFF, .GIF, or .SND without trying to compress them.  (Image and
  270. sound files often have their own specialized compression methods.)
  271. The default suffix list is ".Z:.zip;.zoo:.arc:.lzh:.arj".
  272. The environment variable ZIPOPT can be used to change this default. For
  273. example:
  274. .sk
  275. .indent 10;$ ZIPOPT == "-n .Z:.zip:.tiff:.gif:.snd"
  276. .sk
  277. The variable ZIPOPT can be used for any option and can include several
  278. options.
  279. .sk
  280. Under Unix and under OS/2 (if files from a HPFS are stored), Zip will store
  281. the full path (relative to the current path) and name of the file (or just
  282. the name if -j is specified) in the zip file along with the Unix
  283. attributes, and it will mark the entry as made under Unix.  If the zip file
  284. is intended for PKUNZIP under MSDOS, then the -k (Katz) option should be
  285. used to attempt to convert the names and paths to conform to MSDOS, store
  286. only the MSDOS attribute (just the user write attribute from Unix), and
  287. mark the entry as made under MSDOS (even though it wasn't).
  288. .sk
  289. The -o (older) option will set the "last modified" time of the zip file to
  290. the latest "last modified" time of the entries in the zip file.  This can
  291. be used without any other operations, if desired.  For example:
  292. .sk;.indent 10
  293. $ zip -o foo
  294. .sk
  295. will change the last modified time of FOO.ZIP to the latest time of the
  296. entries in FOO.ZIP.
  297. .sk
  298. The -e and -c options operate on all files updated or added to the zip
  299. file.  Encryption (-e) will prompt for a password on the terminal and will
  300. not echo the password as it is typed (if stderr is not a TTY, Zip will exit
  301. with an error). New zip entries will be encrypted using that password.  For
  302. added peace of mind, you can use -ee, which will prompt for the password
  303. twice, checking that the two are the same before using it.
  304. .sk
  305. One-line comments can be added for each file with the -c option.  The zip
  306. file operations (adding or updating) will be done first, and you will then
  307. be prompted for a one-line comment for each file.  You can then enter the
  308. comment followed by return, or just return for no comment.
  309. .sk
  310. The -z option will prompt you for a multi-line comment for the entire zip
  311. file.  This option can be used by itself, or in combination with other
  312. options.  The comment is ended by a line containing just a period, or an
  313. end of file condition (^D on Unix, ^Z on MSDOS, OS/2, and VAX/VMS).
  314. .sk
  315. The -q (quiet) option eliminates the informational messages and comment
  316. prompts while Zip is operating.  This might be used in shell scripts, for
  317. example, or if the zip operation is being performed as a background task
  318. ("$ spawn/nowait zip -q foo *.c").
  319. .sk
  320. Zip can take a list of file names to operate on from SYS$INPUT using the
  321. "-@"
  322. option.
  323. .!  In Unix, this option can be used with the find command to extend
  324. .!greatly the functionality of Zip. For example, to zip up all the C source
  325. .!files in the current directory and its subdirectories, you can:
  326. .!.sk
  327. .!find . -type f -name "*.[ch]" -print | zip source -@
  328. .!.sk
  329. .!Note that the pattern must be quoted to keep the shell from expanding it.
  330. .sk
  331. Under VMS only, the -w option will append the version number of the files
  332. to the name and zip up multiple versions of files.  Without -w, Zip will
  333. only use the most recent version of the specified file(s).
  334. .sk
  335. One more option that valid only under VMS is -V option. This option saves
  336. all (hopefully) file attributes needed to make EXACT copy of the
  337. file after extraction from archive. To extract a file with saved attributes
  338. use UnZip version 4.2 or later. Note that to specify this option you should
  339. quote it ("-V"). Be carefull: it's rather hard (if possible at all) to extract
  340. a file archived on VMS with this option specified on other systems. See 
  341. documentation on UnZip for further information.
  342. .sk
  343. The -l option translates the Unix end-of-line character LF into the
  344. MSDOS convention CR LF. This option should not be used on binary files.
  345. This option can be used on Unix if the zip file is intended for PKUNZIP
  346. under MSDOS.
  347. .sk
  348. If Zip is run with the -h option, or with no arguments and standard output is
  349. a terminal, the license and the command-argument and option help is shown.
  350. The -L option just shows the license.
  351. .!------------------------------------------------------------------------------
  352. .indent -4
  353. 2 Copyright
  354. .br
  355.      Copyright (C) 1990,1991 Mark Adler, Richard B. Wales, Jean-loup Gailly,
  356.      Igor Mandrichenko and Kai Uwe Rommel. Permission is granted to any
  357.      individual or institution to use, copy, or redistribute this software
  358.      so long as all of the original files are included unmodified,
  359.      that it is not sold for profit, and that this copyright
  360.      notice is retained.
  361. .!------------------------------------------------------------------------------
  362. .indent -4
  363. 2 Acknowledgements
  364. .br
  365.      Thanks to R. P. Byrne for his Shrink.Pas program which
  366.      inspired this project; to Phil Katz for making the zip file format,
  367.      compression format, and .ZIP filename extension all public
  368.      domain; to Steve Burg and Phil Katz for help on unclear points of
  369.      the deflate format; to Keith Petersen for providing a mailing list and
  370.      ftp site for the INFO-ZIP group to use; and most importantly, to
  371.      the INFO-ZIP group itself (listed in the file
  372.      infozip.who) without whose tireless testing and bug-fixing
  373.      efforts a portable Zip would not have been possible.
  374.      Finally we should thank (blame) the INFO-ZIP moderator,
  375.      David Kirschbaum for getting us into this mess in the first
  376.      place.
  377. .!------------------------------------------------------------------------------
  378. .indent -4
  379. 2 Bugs
  380. .sk
  381.      WARNING: zip files produced by this version of zip must not be
  382.      *updated* by zip 1.0 or pkzip 1.10 or pkzip 1.93a, if they contain
  383.      encrypted members, or if they have been produced in a pipe or on a non
  384.      seekable device. The old versions of zip or pkzip would destroy the
  385.      zip structure. The old versions can list the contents of the zip file
  386.      but cannot extract it anyway (because of the new compression algorithm).
  387.      If you do not use encryption and use regular disk files, you do
  388.      not have to care about this problem.
  389. .sk
  390.      Under VMS, not all of the odd file formats are treated properly.  Only
  391.      zip files of format stream-LF and fixed length 512 are expected to work
  392.      with Zip.  Others can be converted using Rahul Dhesi's BILF
  393.      program.  This version of Zip does handle some of the
  394.      conversion internally.
  395.      When using Kermit to transfer zip files from Vax to MSDOS, type "set
  396.      file type block" on the Vax.  When transfering from MSDOS to Vax, type
  397.      "set file type fixed" on the Vax.  In both cases, type "set file type
  398.      binary" on MSDOS.
  399. .sk
  400.      Under VMS, zip hangs for file specification that uses DECnet
  401.      syntax (foo::*.*).
  402. .sk
  403.      LIKE ANYTHING ELSE THAT'S FREE, ZIP AND ITS ASSOCIATED UTILITIES
  404.      ARE PROVIDED AS IS AND COME WITH NO WARRANTY OF ANY
  405.      KIND, EITHER EXPRESSED OR IMPLIED. IN NO EVENT WILL THE
  406.      COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES RESULTING FROM
  407.      THE USE OF THIS SOFTWARE.
  408. .sk
  409.      That having been said, please send any problems or comments
  410.      via email to the Internet address zip-bugs@cs.ucla.edu.  For
  411.      bug reports, please include the version of Zip, the make
  412.      options you used to compile it, the machine and operating
  413.      system you are using, and as much additional information as
  414.      possible.  Thank you for your support.
  415. .!------------------------------------------------------------------------------
  416.